package com.guaoran.jpa.entity;

import com.guaoran.entity.BaseEntity;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;

/**
 * @author : 孤傲然
 * @Description :
 * 	movie表
 * @date :2018/1/22 22:34
 */
@Entity
@Table(name = "vpg_movie")
@Data
//默认为true表示：修改时有那些字段发生变化，SQL语句中只修改这些值。否则修改所有值
@DynamicUpdate
//默认为true表示：插入时有那些字段有值，SQL语句中只插入这些值。否则插入所有值
@DynamicInsert
public class VpgMovie extends BaseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 3121239992757350614L;
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	private Long id;
	private Long packageId;
	private String assetId;
	private String title;
	private String description;
	private String actors;
	private String director;
	private Long status;
	protected VpgMovie() {
	}
	public VpgMovie(Long packageId, String assetId, String title,
					String description, String actors, String director, Long status) {
		this.packageId = packageId;
		this.assetId = assetId;
		this.title = title;
		this.description = description;
		this.actors = actors;
		this.director = director;
		this.status = status;
	}
	public VpgMovie(Long packageId, String assetId, String title) {
		this.packageId = packageId;
		this.assetId = assetId;
		this.title = title;
	}
}